import { createApp } from 'vue'
import App from './App.vue'

import router from './router'

import '@/assets/styles/index.scss'

import { setupI18n } from '@/locale/index'
import { setSpread } from '@/plugin/spread'
import { setElement } from '@/plugin/element'
import { setStore } from '@/plugin/store'

import setDirective from './directive/direct'

;(async () => {
  const app = createApp(App)
  app.config.warnHandler = () => null
  await setupI18n(app)
  setStore(app)
  setElement(app)
  setSpread(app)
  setDirective(app)
  app.use(router).mount('#app')
})()
